import App from './App'
import {
	globalfun
} from './common/fun.js'
// 定义全局自定义过滤器
import {
	filters
} from './common/filters.js'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	//引入全局方法
	Object.keys(globalfun).forEach(key =>
		app.config.globalProperties['$' + key] = globalfun[key]
	)
	Object.keys(filters).forEach(key => {
		app.config.globalProperties['$' + key] = filters[key]
	})
	// Vue.prototype.$imgUrl = 'https://douyin.sheshang-chain.com'
	return {
		app
	}
}
// #endif